Dual imu slam

ABSTRACT

Examples of the disclosure describe systems and methods for presenting virtual content on a wearable head device. In some embodiments, a state of a wearable head device is determined by minimizing a total error based on a reduced weight associated with a reprojection error. A view reflecting the determined state of the wearable head device is presented via a display of the wearable head device. In some embodiments, a wearable head device calculates a preintegration term based on the image data received via a sensor of the wearable head device and the inertial data received via a first IMU and a second IMU of the wearable head device. The wearable head device estimates a position of the device based on the preintegration term, and the wearable head device presents the virtual content based on the position of the device.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Non-Provisional applicationSer. No. 17/072,825, filed on Oct. 16, 2020, which claims the benefit ofU.S. Provisional Application No. 62/923,317, filed on Oct. 18, 2019, andU.S. Provisional Application No. 63/076,251, filed on Sep. 9, 2020, theentire disclosure of which are herein incorporated by reference for allpurposes.

FIELD

This disclosure relates in general to systems and methods for mappingand displaying visual information, and in particular to systems andmethods for mapping and displaying visual information in a mixed realityenvironment.

BACKGROUND

Virtual environments are ubiquitous in computing environments, findinguse in video games (in which a virtual environment may represent a gameworld); maps (in which a virtual environment may represent terrain to benavigated); simulations (in which a virtual environment may simulate areal environment); digital storytelling (in which virtual characters mayinteract with each other in a virtual environment); and many otherapplications. Modern computer users are generally comfortableperceiving, and interacting with, virtual environments. However, users'experiences with virtual environments can be limited by the technologyfor presenting virtual environments. For example, conventional displays(e.g., 2D display screens) and audio systems (e.g., fixed speakers) maybe unable to realize a virtual environment in ways that create acompelling, realistic, and immersive experience.

Virtual reality (“VR”), augmented reality (“AR”), mixed reality (“MR”),and related technologies (collectively, “XR”) share an ability topresent, to a user of an XR system, sensory information corresponding toa virtual environment represented by data in a computer system. Thisdisclosure contemplates a distinction between VR, AR, and MR systems(although some systems may be categorized as VR in one aspect (e.g., avisual aspect), and simultaneously categorized as AR or MR in anotheraspect (e.g., an audio aspect)). As used herein, VR systems present avirtual environment that replaces a user's real environment in at leastone aspect; for example, a VR system could present the user with a viewof the virtual environment while simultaneously obscuring his or herview of the real environment, such as with a light-blocking head-mounteddisplay. Similarly, a VR system could present the user with audiocorresponding to the virtual environment, while simultaneously blocking(attenuating) audio from the real environment.

VR systems may experience various drawbacks that result from replacing auser's real environment with a virtual environment. One drawback is afeeling of motion sickness that can arise when a user's field of view ina virtual environment no longer corresponds to the state of his or herinner ear, which detects one's balance and orientation in the realenvironment (not a virtual environment). Similarly, users may experiencedisorientation in VR environments where their own bodies and limbs(views of which users rely on to feel “grounded” in the realenvironment) are not directly visible. Another drawback is thecomputational burden (e.g., storage, processing power) placed on VRsystems which must present a full 3D virtual environment, particularlyin real-time applications that seek to immerse the user in the virtualenvironment. Similarly, such environments may need to reach a very highstandard of realism to be considered immersive, as users tend to besensitive to even minor imperfections in virtual environments—any ofwhich can destroy a user's sense of immersion in the virtualenvironment. Further, another drawback of VR systems is that suchapplications of systems cannot take advantage of the wide range ofsensory data in the real environment, such as the various sights andsounds that one experiences in the real world. A related drawback isthat VR systems may struggle to create shared environments in whichmultiple users can interact, as users that share a physical space in thereal environment may not be able to directly see or interact with eachother in a virtual environment.

As used herein, AR systems present a virtual environment that overlapsor overlays the real environment in at least one aspect. For example, anAR system could present the user with a view of a virtual environmentoverlaid on the user's view of the real environment, such as with atransmissive head-mounted display that presents a displayed image whileallowing light to pass through the display into the user's eye.Similarly, an AR system could present the user with audio correspondingto the virtual environment, while simultaneously mixing in audio fromthe real environment. Similarly, as used herein, MR systems present avirtual environment that overlaps or overlays the real environment in atleast one aspect, as do AR systems, and may additionally allow that avirtual environment in an MR system may interact with the realenvironment in at least one aspect. For example, a virtual character ina virtual environment may toggle a light switch in the real environment,causing a corresponding light bulb in the real environment to turn on oroff. As another example, the virtual character may react (such as with afacial expression) to audio signals in the real environment. Bymaintaining presentation of the real environment, AR and MR systems mayavoid some of the aforementioned drawbacks of VR systems; for instance,motion sickness in users is reduced because visual cues from the realenvironment (including users' own bodies) can remain visible, and suchsystems need not present a user with a fully realized 3D environment inorder to be immersive. Further, AR and MR systems can take advantage ofreal world sensory input (e.g., views and sounds of scenery, objects,and other users) to create new applications that augment that input.

Presenting a virtual environment that overlaps or overlays the realenvironment can be difficult. For example, mixing a virtual environmentwith a real environment can require a complex and thorough understandingof the real environment such that objects in the virtual environment donot conflict with objects in the real environment. It can further bedesirable to maintain a persistency in the virtual environment thatcorresponds with a consistency in the real environment. For example, itcan be desirable for a virtual object displayed on a physical table toappear at the same location even if a user looks away, moves around, andthen looks back at the physical table. To achieve this type ofimmersion, it can be beneficial to develop an accurate and preciseestimate of where objects are in the real world and where a user is inthe real world.

BRIEF SUMMARY

Examples of the disclosure describe systems and methods for presentingvirtual content on a wearable head device. For example, systems andmethods for performing visual-inertial odometry with gravity estimationsand bundle adjustments are disclosed. In some embodiments, a firstsensor data indicative of a first feature in a first position isreceived via a sensor of a wearable head device. A second sensor dataindicative of the first feature in a second position is received via thesensor. Inertial measurements are received via an inertial measurementunit on the wearable head device. A velocity is determined based on theinertial measurements. A third position of the first feature isestimated based on the first position and the velocity. A reprojectionerror is determined based on the third position and the second position.A weight associated with the reprojection error is reduced. A state ofthe wearable head device is determined. Determining the state includesminimizing a total error, and the total error is based on the reducedweight associated with the reprojection error. A view reflecting thedetermined state of the wearable head device is presented via a displayof the wearable head device.

In some embodiments, the wearable head device receives, via a sensor ofthe wearable head device, image data. The wearable head device receives,via a first inertial measurement unit (IMU) and a second IMU, first andsecond inertial data, respectively. The wearable head device calculatesa preintegration term based on the image data and the inertial data. Thewearable head device estimates a position of the device based on thepreintegration term. Based on the position of the device, the wearablehead device presents the virtual content.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A-1C illustrate exemplary mixed reality environments, accordingto one or more embodiments of the disclosure.

FIGS. 2A-2D illustrate components of exemplary mixed reality systems,according to one or more embodiments of the disclosure.

FIG. 3A illustrates an exemplary mixed reality handheld controller,according to one or more embodiments of the disclosure.

FIG. 3B illustrates an exemplary auxiliary unit, according to one ormore embodiments of the disclosure.

FIG. 4 illustrates an exemplary functional block diagram for an examplemixed reality system, according to one or more embodiments of thedisclosure.

FIG. 5 illustrates an exemplary pipeline for visual-inertial odometry,according to one or more embodiments of the disclosure.

FIGS. 6A-6B illustrate exemplary graphs for visual-inertial odometry,according to one or more embodiments of the disclosure.

FIGS. 7A-7B illustrate exemplary decision processes for performingbundle adjustments, according to one or more embodiments of thedisclosure.

FIG. 8 illustrates an exemplary graph for a standalone gravity estimate,according to one or more embodiments of the disclosure.

FIG. 9 illustrates an exemplary IMU configuration, according to one ormore embodiments of the disclosure.

FIG. 10 illustrates an exemplary IMU configuration, according to one ormore embodiments of the disclosure.

FIG. 11 illustrates an exemplary graphical representation of SLAMcomputations, according to one or more embodiments of the disclosure.

FIG. 12 illustrates an exemplary process for presenting virtual content,according to one or more embodiments of the disclosure.

DETAILED DESCRIPTION

In the following description of examples, reference is made to theaccompanying drawings which form a part hereof, and in which it is shownby way of illustration specific examples that can be practiced. It is tobe understood that other examples can be used and structural changes canbe made without departing from the scope of the disclosed examples.

Mixed Reality Environment

Like all people, a user of a mixed reality system exists in a realenvironment—that is, a three-dimensional portion of the “real world,”and all of its contents, that are perceptible by the user. For example,a user perceives a real environment using one's ordinary humansenses—sight, sound, touch, taste, smell—and interacts with the realenvironment by moving one's own body in the real environment. Locationsin a real environment can be described as coordinates in a coordinatespace; for example, a coordinate can comprise latitude, longitude, andelevation with respect to sea level; distances in three orthogonaldimensions from a reference point; or other suitable values. Likewise, avector can describe a quantity having a direction and a magnitude in thecoordinate space.

A computing device can maintain, for example in a memory associated withthe device, a representation of a virtual environment. As used herein, avirtual environment is a computational representation of athree-dimensional space. A virtual environment can includerepresentations of any object, action, signal, parameter, coordinate,vector, or other characteristic associated with that space. In someexamples, circuitry (e.g., a processor) of a computing device canmaintain and update a state of a virtual environment; that is, aprocessor can determine at a first time t0, based on data associatedwith the virtual environment and/or input provided by a user, a state ofthe virtual environment at a second time t1. For instance, if an objectin the virtual environment is located at a first coordinate at time t0,and has certain programmed physical parameters (e.g., mass, coefficientof friction); and an input received from user indicates that a forceshould be applied to the object in a direction vector; the processor canapply laws of kinematics to determine a location of the object at timet1 using basic mechanics. The processor can use any suitable informationknown about the virtual environment, and/or any suitable input, todetermine a state of the virtual environment at a time t1. Inmaintaining and updating a state of a virtual environment, the processorcan execute any suitable software, including software relating to thecreation and deletion of virtual objects in the virtual environment;software (e.g., scripts) for defining behavior of virtual objects orcharacters in the virtual environment; software for defining thebehavior of signals (e.g., audio signals) in the virtual environment;software for creating and updating parameters associated with thevirtual environment; software for generating audio signals in thevirtual environment; software for handling input and output; softwarefor implementing network operations; software for applying asset data(e.g., animation data to move a virtual object over time); or many otherpossibilities.

Output devices, such as a display or a speaker, can present any or allaspects of a virtual environment to a user. For example, a virtualenvironment may include virtual objects (which may includerepresentations of inanimate objects; people; animals; lights; etc.)that may be presented to a user. A processor can determine a view of thevirtual environment (for example, corresponding to a “camera” with anorigin coordinate, a view axis, and a frustum); and render, to adisplay, a viewable scene of the virtual environment corresponding tothat view. Any suitable rendering technology may be used for thispurpose. In some examples, the viewable scene may include only somevirtual objects in the virtual environment, and exclude certain othervirtual objects. Similarly, a virtual environment may include audioaspects that may be presented to a user as one or more audio signals.For instance, a virtual object in the virtual environment may generate asound originating from a location coordinate of the object (e.g., avirtual character may speak or cause a sound effect); or the virtualenvironment may be associated with musical cues or ambient sounds thatmay or may not be associated with a particular location. A processor candetermine an audio signal corresponding to a “listener” coordinate—forinstance, an audio signal corresponding to a composite of sounds in thevirtual environment, and mixed and processed to simulate an audio signalthat would be heard by a listener at the listener coordinate—and presentthe audio signal to a user via one or more speakers.

Because a virtual environment exists only as a computational structure,a user cannot directly perceive a virtual environment using one'sordinary senses. Instead, a user can perceive a virtual environment onlyindirectly, as presented to the user, for example by a display,speakers, haptic output devices, etc. Similarly, a user cannot directlytouch, manipulate, or otherwise interact with a virtual environment; butcan provide input data, via input devices or sensors, to a processorthat can use the device or sensor data to update the virtualenvironment. For example, a camera sensor can provide optical dataindicating that a user is trying to move an object in a virtualenvironment, and a processor can use that data to cause the object torespond accordingly in the virtual environment.

A mixed reality system can present to the user, for example using atransmissive display and/or one or more speakers (which may, forexample, be incorporated into a wearable head device), a mixed realityenvironment (“MRE”) that combines aspects of a real environment and avirtual environment. In some embodiments, the one or more speakers maybe external to the head-mounted wearable unit. As used herein, a MRE isa simultaneous representation of a real environment and a correspondingvirtual environment. In some examples, the corresponding real andvirtual environments share a single coordinate space; in some examples,a real coordinate space and a corresponding virtual coordinate space arerelated to each other by a transformation matrix (or other suitablerepresentation). Accordingly, a single coordinate (along with, in someexamples, a transformation matrix) can define a first location in thereal environment, and also a second, corresponding, location in thevirtual environment; and vice versa.

In a MRE, a virtual object (e.g., in a virtual environment associatedwith the MRE) can correspond to a real object (e.g., in a realenvironment associated with the MRE). For instance, if the realenvironment of a MRE comprises a real lamp post (a real object) at alocation coordinate, the virtual environment of the MRE may comprise avirtual lamp post (a virtual object) at a corresponding locationcoordinate. As used herein, the real object in combination with itscorresponding virtual object together constitute a “mixed realityobject.” It is not necessary for a virtual object to perfectly match oralign with a corresponding real object. In some examples, a virtualobject can be a simplified version of a corresponding real object. Forinstance, if a real environment includes a real lamp post, acorresponding virtual object may comprise a cylinder of roughly the sameheight and radius as the real lamp post (reflecting that lamp posts maybe roughly cylindrical in shape). Simplifying virtual objects in thismanner can allow computational efficiencies, and can simplifycalculations to be performed on such virtual objects. Further, in someexamples of a MRE, not all real objects in a real environment may beassociated with a corresponding virtual object. Likewise, in someexamples of a MRE, not all virtual objects in a virtual environment maybe associated with a corresponding real object. That is, some virtualobjects may solely in a virtual environment of a MRE, without anyreal-world counterpart.

In some examples, virtual objects may have characteristics that differ,sometimes drastically, from those of corresponding real objects. Forinstance, while a real environment in a MRE may comprise a green,two-armed cactus—a prickly inanimate object—a corresponding virtualobject in the MRE may have the characteristics of a green, two-armedvirtual character with human facial features and a surly demeanor. Inthis example, the virtual object resembles its corresponding real objectin certain characteristics (color, number of arms); but differs from thereal object in other characteristics (facial features, personality). Inthis way, virtual objects have the potential to represent real objectsin a creative, abstract, exaggerated, or fanciful manner; or to impartbehaviors (e.g., human personalities) to otherwise inanimate realobjects. In some examples, virtual objects may be purely fancifulcreations with no real-world counterpart (e.g., a virtual monster in avirtual environment, perhaps at a location corresponding to an emptyspace in a real environment).

Compared to VR systems, which present the user with a virtualenvironment while obscuring the real environment, a mixed reality systempresenting a MRE affords the advantage that the real environment remainsperceptible while the virtual environment is presented. Accordingly, theuser of the mixed reality system is able to use visual and audio cuesassociated with the real environment to experience and interact with thecorresponding virtual environment. As an example, while a user of VRsystems may struggle to perceive or interact with a virtual objectdisplayed in a virtual environment—because, as noted herein, a user maynot directly perceive or interact with a virtual environment—a user ofan MR system may find it intuitive and natural to interact with avirtual object by seeing, hearing, and touching a corresponding realobject in his or her own real environment. This level of interactivitycan heighten a user's feelings of immersion, connection, and engagementwith a virtual environment. Similarly, by simultaneously presenting areal environment and a virtual environment, mixed reality systems canreduce negative psychological feelings (e.g., cognitive dissonance) andnegative physical feelings (e.g., motion sickness) associated with VRsystems. Mixed reality systems further offer many possibilities forapplications that may augment or alter our experiences of the realworld.

FIG. 1A illustrates an exemplary real environment 100 in which a user110 uses a mixed reality system 112. Mixed reality system 112 maycomprise a display (e.g., a transmissive display) and one or morespeakers, and one or more sensors (e.g., a camera), for example asdescribed herein. The real environment 100 shown comprises a rectangularroom 104A, in which user 110 is standing; and real objects 122A (alamp), 124A (a table), 126A (a sofa), and 128A (a painting). Room 104Afurther comprises a location coordinate 106, which may be considered anorigin of the real environment 100. As shown in FIG. 1A, anenvironment/world coordinate system 108 (comprising an x-axis 108X, ay-axis 108Y, and a z-axis 108Z) with its origin at point 106 (a worldcoordinate), can define a coordinate space for real environment 100. Insome embodiments, the origin point 106 of the environment/worldcoordinate system 108 may correspond to where the mixed reality system112 was powered on. In some embodiments, the origin point 106 of theenvironment/world coordinate system 108 may be reset during operation.In some examples, user 110 may be considered a real object in realenvironment 100; similarly, user 110's body parts (e.g., hands, feet)may be considered real objects in real environment 100. In someexamples, a user/listener/head coordinate system 114 (comprising anx-axis 114X, a y-axis 114Y, and a z-axis 114Z) with its origin at point115 (e.g., user/listener/head coordinate) can define a coordinate spacefor the user/listener/head on which the mixed reality system 112 islocated. The origin point 115 of the user/listener/head coordinatesystem 114 may be defined relative to one or more components of themixed reality system 112. For example, the origin point 115 of theuser/listener/head coordinate system 114 may be defined relative to thedisplay of the mixed reality system 112 such as during initialcalibration of the mixed reality system 112. A matrix (which may includea translation matrix and a Quaternion matrix or other rotation matrix),or other suitable representation can characterize a transformationbetween the user/listener/head coordinate system 114 space and theenvironment/world coordinate system 108 space. In some embodiments, aleft ear coordinate 116 and a right ear coordinate 117 may be definedrelative to the origin point 115 of the user/listener/head coordinatesystem 114. A matrix (which may include a translation matrix and aQuaternion matrix or other rotation matrix), or other suitablerepresentation can characterize a transformation between the left earcoordinate 116 and the right ear coordinate 117, and user/listener/headcoordinate system 114 space. The user/listener/head coordinate system114 can simplify the representation of locations relative to the user'shead, or to a head-mounted device, for example, relative to theenvironment/world coordinate system 108. Using Simultaneous Localizationand Mapping (SLAM), visual odometry, or other techniques, atransformation between user coordinate system 114 and environmentcoordinate system 108 can be determined and updated in real-time.

FIG. 1B illustrates an exemplary virtual environment 130 thatcorresponds to real environment 100. The virtual environment 130 showncomprises a virtual rectangular room 104B corresponding to realrectangular room 104A; a virtual object 122B corresponding to realobject 122A; a virtual object 124B corresponding to real object 124A;and a virtual object 126B corresponding to real object 126A. Metadataassociated with the virtual objects 122B, 124B, 126B can includeinformation derived from the corresponding real objects 122A, 124A,126A. Virtual environment 130 additionally comprises a virtual monster132, which does not correspond to any real object in real environment100. Real object 128A in real environment 100 does not correspond to anyvirtual object in virtual environment 130. A persistent coordinatesystem 133 (comprising an x-axis 133X, a y-axis 133Y, and a z-axis 133Z)with its origin at point 134 (persistent coordinate), can define acoordinate space for virtual content. The origin point 134 of thepersistent coordinate system 133 may be defined relative/with respect toone or more real objects, such as the real object 126A. A matrix (whichmay include a translation matrix and a Quaternion matrix or otherrotation matrix), or other suitable representation can characterize atransformation between the persistent coordinate system 133 space andthe environment/world coordinate system 108 space. In some embodiments,each of the virtual objects 122B, 124B, 126B, and 132 may have their ownpersistent coordinate point relative to the origin point 134 of thepersistent coordinate system 133. In some embodiments, there may bemultiple persistent coordinate systems and each of the virtual objects122B, 124B, 126B, and 132 may have their own persistent coordinate pointrelative to one or more persistent coordinate systems.

With respect to FIGS. 1A and 1B, environment/world coordinate system 108defines a shared coordinate space for both real environment 100 andvirtual environment 130. In the example shown, the coordinate space hasits origin at point 106. Further, the coordinate space is defined by thesame three orthogonal axes (108X, 108Y, 108Z). Accordingly, a firstlocation in real environment 100, and a second, corresponding locationin virtual environment 130, can be described with respect to the samecoordinate space. This simplifies identifying and displayingcorresponding locations in real and virtual environments, because thesame coordinates can be used to identify both locations. However, insome examples, corresponding real and virtual environments need not usea shared coordinate space. For instance, in some examples (not shown), amatrix (which may include a translation matrix and a Quaternion matrixor other rotation matrix), or other suitable representation cancharacterize a transformation between a real environment coordinatespace and a virtual environment coordinate space.

FIG. 1C illustrates an exemplary MRE 150 that simultaneously presentsaspects of real environment 100 and virtual environment 130 to user 110via mixed reality system 112. In the example shown, MRE 150simultaneously presents user 110 with real objects 122A, 124A, 126A, and128A from real environment 100 (e.g., via a transmissive portion of adisplay of mixed reality system 112); and virtual objects 122B, 124B,126B, and 132 from virtual environment 130 (e.g., via an active displayportion of the display of mixed reality system 112). As describedherein, origin point 106 may act as an origin for a coordinate spacecorresponding to MRE 150, and coordinate system 108 defines an x-axis,y-axis, and z-axis for the coordinate space.

In the example shown, mixed reality objects comprise corresponding pairsof real objects and virtual objects (i.e., 122A/122B, 124A/124B,126A/126B) that occupy corresponding locations in coordinate space 108.In some examples, both the real objects and the virtual objects may besimultaneously visible to user 110. This may be desirable in, forexample, instances where the virtual object presents informationdesigned to augment a view of the corresponding real object (such as ina museum application where a virtual object presents the missing piecesof an ancient damaged sculpture). In some examples, the virtual objects(122B, 124B, and/or 126B) may be displayed (e.g., via active pixelatedocclusion using a pixelated occlusion shutter) so as to occlude thecorresponding real objects (122A, 124A, and/or 126A). This may bedesirable in, for example, instances where the virtual object acts as avisual replacement for the corresponding real object (such as in aninteractive storytelling application where an inanimate real objectbecomes a “living” character).

In some examples, real objects (e.g., 122A, 124A, 126A) may beassociated with virtual content or helper data that may not necessarilyconstitute virtual objects. Virtual content or helper data canfacilitate processing or handling of virtual objects in the mixedreality environment. For example, such virtual content could includetwo-dimensional representations of corresponding real objects; customasset types associated with corresponding real objects; or statisticaldata associated with corresponding real objects. This information canenable or facilitate calculations involving a real object withoutincurring unnecessary computational overhead.

In some examples, the presentation described herein may also incorporateaudio aspects. For instance, in MRE 150, virtual monster 132 could beassociated with one or more audio signals, such as a footstep soundeffect that is generated as the monster walks around MRE 150. Asdescribed herein, a processor of mixed reality system 112 can compute anaudio signal corresponding to a mixed and processed composite of allsuch sounds in MRE 150, and present the audio signal to user 110 via oneor more speakers included in mixed reality system 112 and/or one or moreexternal speakers.

Exemplary Mixed Reality System

Exemplary mixed reality system 112 can include a wearable head device(e.g., a wearable augmented reality or mixed reality head device)comprising a display (which may comprise left and right transmissivedisplays, which may be near-eye displays, and associated components forcoupling light from the displays to the user's eyes); left and rightspeakers (e.g., positioned adjacent to the user's left and right ears,respectively); an inertial measurement unit (IMU)(e.g., mounted to atemple arm of the head device); an orthogonal coil electromagneticreceiver (e.g., mounted to the left temple piece); left and rightcameras (e.g., depth (time-of-flight) cameras) oriented away from theuser; and left and right eye cameras oriented toward the user (e.g., fordetecting the user's eye movements). However, a mixed reality system 112can incorporate any suitable display technology, and any suitablesensors (e.g., optical, infrared, acoustic, LIDAR, EOG, GPS, magnetic).In addition, mixed reality system 112 may incorporate networkingfeatures (e.g., Wi-Fi capability) to communicate with other devices andsystems, including other mixed reality systems. Mixed reality system 112may further include a battery (which may be mounted in an auxiliaryunit, such as a belt pack designed to be worn around a user's waist), aprocessor, and a memory. The wearable head device of mixed realitysystem 112 may include tracking components, such as an IMU or othersuitable sensors, configured to output a set of coordinates of thewearable head device relative to the user's environment. In someexamples, tracking components may provide input to a processorperforming a Simultaneous Localization and Mapping (SLAM) and/or visualodometry algorithm. In some examples, mixed reality system 112 may alsoinclude a handheld controller 300, and/or an auxiliary unit 320, whichmay be a wearable beltpack, as described further herein.

FIGS. 2A-2D illustrate components of an exemplary mixed reality system200 (which may correspond to mixed reality system 112) that may be usedto present a MRE (which may correspond to MRE 150), or other virtualenvironment, to a user. FIG. 2A illustrates a perspective view of awearable head device 2102 included in example mixed reality system 200.FIG. 2B illustrates a top view of wearable head device 2102 worn on auser's head 2202. FIG. 2C illustrates a front view of wearable headdevice 2102. FIG. 2D illustrates an edge view of example eyepiece 2110of wearable head device 2102. As shown in FIGS. 2A-2C, the examplewearable head device 2102 includes an exemplary left eyepiece (e.g., aleft transparent waveguide set eyepiece) 2108 and an exemplary righteyepiece (e.g., a right transparent waveguide set eyepiece) 2110. Eacheyepiece 2108 and 2110 can include transmissive elements through which areal environment can be visible, as well as display elements forpresenting a display (e.g., via imagewise modulated light) overlappingthe real environment. In some examples, such display elements caninclude surface diffractive optical elements for controlling the flow ofimagewise modulated light. For instance, the left eyepiece 2108 caninclude a left incoupling grating set 2112, a left orthogonal pupilexpansion (OPE) grating set 2120, and a left exit (output) pupilexpansion (EPE) grating set 2122. Similarly, the right eyepiece 2110 caninclude a right incoupling grating set 2118, a right OPE grating set2114 and a right EPE grating set 2116. Imagewise modulated light can betransferred to a user's eye via the incoupling gratings 2112 and 2118,OPEs 2114 and 2120, and EPE 2116 and 2122. Each incoupling grating set2112, 2118 can be configured to deflect light toward its correspondingOPE grating set 2120, 2114. Each OPE grating set 2120, 2114 can bedesigned to incrementally deflect light down toward its associated EPE2122, 2116, thereby horizontally extending an exit pupil being formed.Each EPE 2122, 2116 can be configured to incrementally redirect at leasta portion of light received from its corresponding OPE grating set 2120,2114 outward to a user eyebox position (not shown) defined behind theeyepieces 2108, 2110, vertically extending the exit pupil that is formedat the eyebox. Alternatively, in lieu of the incoupling grating sets2112 and 2118, OPE grating sets 2114 and 2120, and EPE grating sets 2116and 2122, the eyepieces 2108 and 2110 can include other arrangements ofgratings and/or refractive and reflective features for controlling thecoupling of imagewise modulated light to the user's eyes.

In some examples, wearable head device 2102 can include a left templearm 2130 and a right temple arm 2132, where the left temple arm 2130includes a left speaker 2134 and the right temple arm 2132 includes aright speaker 2136. An orthogonal coil electromagnetic receiver 2138 canbe located in the left temple piece, or in another suitable location inthe wearable head unit 2102. An Inertial Measurement Unit (IMU) 2140 canbe located in the right temple arm 2132, or in another suitable locationin the wearable head device 2102. The wearable head device 2102 can alsoinclude a left depth (e.g., time-of-flight) camera 2142 and a rightdepth camera 2144. The depth cameras 2142, 2144 can be suitably orientedin different directions so as to together cover a wider field of view.

In the example shown in FIGS. 2A-2D, a left source of imagewisemodulated light 2124 can be optically coupled into the left eyepiece2108 through the left incoupling grating set 2112, and a right source ofimagewise modulated light 2126 can be optically coupled into the righteyepiece 2110 through the right incoupling grating set 2118. Sources ofimagewise modulated light 2124, 2126 can include, for example, opticalfiber scanners; projectors including electronic light modulators such asDigital Light Processing (DLP) chips or Liquid Crystal on Silicon (LCoS)modulators; or emissive displays, such as micro Light Emitting Diode(μLED) or micro Organic Light Emitting Diode (μOLED) panels coupled intothe incoupling grating sets 2112, 2118 using one or more lenses perside. The input coupling grating sets 2112, 2118 can deflect light fromthe sources of imagewise modulated light 2124, 2126 to angles above thecritical angle for Total Internal Reflection (TIR) for the eyepieces2108, 2110. The OPE grating sets 2114, 2120 incrementally deflect lightpropagating by TIR down toward the EPE grating sets 2116, 2122. The EPEgrating sets 2116, 2122 incrementally couple light toward the user'sface, including the pupils of the user's eyes.

In some examples, as shown in FIG. 2D, each of the left eyepiece 2108and the right eyepiece 2110 includes a plurality of waveguides 2402. Forexample, each eyepiece 2108, 2110 can include multiple individualwaveguides, each dedicated to a respective color channel (e.g., red,blue and green). In some examples, each eyepiece 2108, 2110 can includemultiple sets of such waveguides, with each set configured to impartdifferent wavefront curvature to emitted light. The wavefront curvaturemay be convex with respect to the user's eyes, for example to present avirtual object positioned a distance in front of the user (e.g., by adistance corresponding to the reciprocal of wavefront curvature). Insome examples, EPE grating sets 2116, 2122 can include curved gratinggrooves to effect convex wavefront curvature by altering the Poyntingvector of exiting light across each EPE.

In some examples, to create a perception that displayed content isthree-dimensional, stereoscopically-adjusted left and right eye imagerycan be presented to the user through the imagewise light modulators2124, 2126 and the eyepieces 2108, 2110. The perceived realism of apresentation of a three-dimensional virtual object can be enhanced byselecting waveguides (and thus corresponding the wavefront curvatures)such that the virtual object is displayed at a distance approximating adistance indicated by the stereoscopic left and right images. Thistechnique may also reduce motion sickness experienced by some users,which may be caused by differences between the depth perception cuesprovided by stereoscopic left and right eye imagery, and the autonomicaccommodation (e.g., object distance-dependent focus) of the human eye.

FIG. 2D illustrates an edge-facing view from the top of the righteyepiece 2110 of example wearable head device 2102. As shown in FIG. 2D,the plurality of waveguides 2402 can include a first subset of threewaveguides 2404 and a second subset of three waveguides 2406. The twosubsets of waveguides 2404, 2406 can be differentiated by different EPEgratings featuring different grating line curvatures to impart differentwavefront curvatures to exiting light. Within each of the subsets ofwaveguides 2404, 2406 each waveguide can be used to couple a differentspectral channel (e.g., one of red, green and blue spectral channels) tothe user's right eye 2206. (Although not shown in FIG. 2D, the structureof the left eyepiece 2108 is analogous to the structure of the righteyepiece 2110.)

FIG. 3A illustrates an exemplary handheld controller component 300 of amixed reality system 200. In some examples, handheld controller 300includes a grip portion 346 and one or more buttons 350 disposed along atop surface 348. In some examples, buttons 350 may be configured for useas an optical tracking target, e.g., for tracking six-degree-of-freedom(6DOF) motion of the handheld controller 300, in conjunction with acamera or other optical sensor (which may be mounted in a head unit(e.g., wearable head device 2102) of mixed reality system 200). In someexamples, handheld controller 300 includes tracking components (e.g., anIMU or other suitable sensors) for detecting position or orientation,such as position or orientation relative to wearable head device 2102.In some examples, such tracking components may be positioned in a handleof handheld controller 300, and/or may be mechanically coupled to thehandheld controller. Handheld controller 300 can be configured toprovide one or more output signals corresponding to one or more of apressed state of the buttons; or a position, orientation, and/or motionof the handheld controller 300 (e.g., via an IMU). Such output signalsmay be used as input to a processor of mixed reality system 200. Suchinput may correspond to a position, orientation, and/or movement of thehandheld controller (and, by extension, to a position, orientation,and/or movement of a hand of a user holding the controller). Such inputmay also correspond to a user pressing buttons 350.

FIG. 3B illustrates an exemplary auxiliary unit 320 of a mixed realitysystem 200. The auxiliary unit 320 can include a battery to provideenergy to operate the system 200, and can include a processor forexecuting programs to operate the system 200. As shown, the exampleauxiliary unit 320 includes a clip 2128, such as for attaching theauxiliary unit 320 to a user's belt. Other form factors are suitable forauxiliary unit 320 and will be apparent, including form factors that donot involve mounting the unit to a user's belt. In some examples,auxiliary unit 320 is coupled to the wearable head device 2102 through amulticonduit cable that can include, for example, electrical wires andfiber optics. Wireless connections between the auxiliary unit 320 andthe wearable head device 2102 can also be used.

In some examples, mixed reality system 200 can include one or moremicrophones to detect sound and provide corresponding signals to themixed reality system. In some examples, a microphone may be attached to,or integrated with, wearable head device 2102, and may be configured todetect a user's voice. In some examples, a microphone may be attachedto, or integrated with, handheld controller 300 and/or auxiliary unit320. Such a microphone may be configured to detect environmental sounds,ambient noise, voices of a user or a third party, or other sounds.

FIG. 4 shows an exemplary functional block diagram that may correspondto an exemplary mixed reality system, such as mixed reality system 200described herein (which may correspond to mixed reality system 112 withrespect to FIG. 1). As shown in FIG. 4, example handheld controller 400B(which may correspond to handheld controller 300 (a “totem”)) includes atotem-to-wearable head device six degree of freedom (6DOF) totemsubsystem 404A and example wearable head device 400A (which maycorrespond to wearable head device 2102) includes a totem-to-wearablehead device 6DOF subsystem 404B. In the example, the 6DOF totemsubsystem 404A and the 6DOF subsystem 404B cooperate to determine sixcoordinates (e.g., offsets in three translation directions and rotationalong three axes) of the handheld controller 400B relative to thewearable head device 400A. The six degrees of freedom may be expressedrelative to a coordinate system of the wearable head device 400A. Thethree translation offsets may be expressed as X, Y, and Z offsets insuch a coordinate system, as a translation matrix, or as some otherrepresentation. The rotation degrees of freedom may be expressed assequence of yaw, pitch and roll rotations, as a rotation matrix, as aquaternion, or as some other representation. In some examples, thewearable head device 400A; one or more depth cameras 444 (and/or one ormore non-depth cameras) included in the wearable head device 400A;and/or one or more optical targets (e.g., buttons 350 of handheldcontroller 400B as described herein, or dedicated optical targetsincluded in the handheld controller 400B) can be used for 6DOF tracking.In some examples, the handheld controller 400B can include a camera, asdescribed herein; and the wearable head device 400A can include anoptical target for optical tracking in conjunction with the camera. Insome examples, the wearable head device 400A and the handheld controller400B each include a set of three orthogonally oriented solenoids whichare used to wirelessly send and receive three distinguishable signals.By measuring the relative magnitude of the three distinguishable signalsreceived in each of the coils used for receiving, the 6DOF of thewearable head device 400A relative to the handheld controller 400B maybe determined. Additionally, 6DOF totem subsystem 404A can include anInertial Measurement Unit (IMU) that is useful to provide improvedaccuracy and/or more timely information on rapid movements of thehandheld controller 400B.

In some examples, it may become necessary to transform coordinates froma local coordinate space (e.g., a coordinate space fixed relative to thewearable head device 400A) to an inertial coordinate space (e.g., acoordinate space fixed relative to the real environment), for example inorder to compensate for the movement of the wearable head device 400Arelative to the coordinate system 108. For instance, suchtransformations may be necessary for a display of the wearable headdevice 400A to present a virtual object at an expected position andorientation relative to the real environment (e.g., a virtual personsitting in a real chair, facing forward, regardless of the wearable headdevice's position and orientation), rather than at a fixed position andorientation on the display (e.g., at the same position in the rightlower corner of the display), to preserve the illusion that the virtualobject exists in the real environment (and does not, for example, appearpositioned unnaturally in the real environment as the wearable headdevice 400A shifts and rotates). In some examples, a compensatorytransformation between coordinate spaces can be determined by processingimagery from the depth cameras 444 using a SLAM and/or visual odometryprocedure in order to determine the transformation of the wearable headdevice 400A relative to the coordinate system 108. In the example shownin FIG. 4, the depth cameras 444 are coupled to a SLAM/visual odometryblock 406 and can provide imagery to block 406. The SLAM/visual odometryblock 406 implementation can include a processor configured to processthis imagery and determine a position and orientation of the user'shead, which can then be used to identify a transformation between a headcoordinate space and another coordinate space (e.g., an inertialcoordinate space). Similarly, in some examples, an additional source ofinformation on the user's head pose and location is obtained from an IMU409. Information from the IMU 409 can be integrated with informationfrom the SLAM/visual odometry block 406 to provide improved accuracyand/or more timely information on rapid adjustments of the user's headpose and position.

In some examples, the depth cameras 444 can supply 3D imagery to a handgesture tracker 411, which may be implemented in a processor of thewearable head device 400A. The hand gesture tracker 411 can identify auser's hand gestures, for example by matching 3D imagery received fromthe depth cameras 444 to stored patterns representing hand gestures.Other suitable techniques of identifying a user's hand gestures will beapparent.

In some examples, one or more processors 416 may be configured toreceive data from the wearable head device's 6DOF headgear subsystem404B, the IMU 409, the SLAM/visual odometry block 406, depth cameras444, and/or the hand gesture tracker 411. The processor 416 can alsosend and receive control signals from the 6DOF totem system 404A. Theprocessor 416 may be coupled to the 6DOF totem system 404A wirelessly,such as in examples where the handheld controller 400B is untethered.Processor 416 may further communicate with additional components, suchas an audio-visual content memory 418, a Graphical Processing Unit (GPU)420, and/or a Digital Signal Processor (DSP) audio spatializer 422. TheDSP audio spatializer 422 may be coupled to a Head Related TransferFunction (HRTF) memory 425. The GPU 420 can include a left channeloutput coupled to the left source of imagewise modulated light 424 and aright channel output coupled to the right source of imagewise modulatedlight 426. GPU 420 can output stereoscopic image data to the sources ofimagewise modulated light 424, 426, for example as described herein withrespect to FIGS. 2A-2D. The DSP audio spatializer 422 can output audioto a left speaker 412 and/or a right speaker 414. The DSP audiospatializer 422 can receive input from processor 419 indicating adirection vector from a user to a virtual sound source (which may bemoved by the user, e.g., via the handheld controller 320). Based on thedirection vector, the DSP audio spatializer 422 can determine acorresponding HRTF (e.g., by accessing a HRTF, or by interpolatingmultiple HRTFs). The DSP audio spatializer 422 can then apply thedetermined HRTF to an audio signal, such as an audio signalcorresponding to a virtual sound generated by a virtual object. This canenhance the believability and realism of the virtual sound, byincorporating the relative position and orientation of the user relativeto the virtual sound in the mixed reality environment—that is, bypresenting a virtual sound that matches a user's expectations of whatthat virtual sound would sound like if it were a real sound in a realenvironment.

In some examples, such as shown in FIG. 4, one or more of processor 416,GPU 420, DSP audio spatializer 422, HRTF memory 425, and audio/visualcontent memory 418 may be included in an auxiliary unit 400C (which maycorrespond to auxiliary unit 320 described herein). The auxiliary unit400C may include a battery 427 to power its components and/or to supplypower to the wearable head device 400A or handheld controller 400B.Including such components in an auxiliary unit, which can be mounted toa user's waist, can limit the size and weight of the wearable headdevice 400A, which can in turn reduce fatigue of a user's head and neck.

While FIG. 4 presents elements corresponding to various components of anexemplary mixed reality system, various other suitable arrangements ofthese components will become apparent to those skilled in the art. Forexample, elements presented in FIG. 4 as being associated with auxiliaryunit 400C could instead be associated with the wearable head device 400Aor handheld controller 400B. Furthermore, some mixed reality systems mayforgo entirely a handheld controller 400B or auxiliary unit 400C. Suchchanges and modifications are to be understood as being included withinthe scope of the disclosed examples.

Simultaneous Localization and Mapping

Displaying virtual content in a mixed reality environment such that thevirtual content corresponds to real content can be challenging. Forexample, it can be desirable to display a virtual object 122B in FIG. 1Cin the same location as real object 122A. To do so can involve a numberof capabilities of mixed reality system 112. For example, mixed realitysystem 112 may create a three-dimensional map of real environment 104Aand real objects (e.g., lamp 122A) within real environment 104A. Mixedreality system 112 may also establish its location within realenvironment 104A (which can correspond to a user's location within thereal environment). Mixed reality system 112 may further establish itsorientation within real environment 104A (which can correspond to auser's orientation within the real environment). Mixed reality system112 may also establish its movement relative to real environment 104A,for example, linear and/or angular velocity and linear and/or angularacceleration (which can correspond to a user's movement relative to thereal environment). SLAM can be one method to display a virtual object122B in the same location as real object 122A even as a user 110 movesaround room 104A, looks away from real object 122A, and looks back atreal object 122A.

It can be further desirable to run SLAM in an accurate, butcomputationally efficient and low-latency manner. As used herein,latency can refer to the time delay between a change in a position ororientation of a component of a mixed reality system (e.g., a rotationof a wearable head device), and the reflection of that change asrepresented in the mixed reality system (e.g., a display angle of afield of view presented in a display of the wearable head device).Computational inefficiency and/or high latency can negatively impact auser's experience with mixed reality system 112. For example, if a user110 looks around room 104A, virtual objects may appear to “jitter” as aresult of the user's motion and/or high latency. Accuracy can becritical to produce an immersive mixed reality environment, otherwisevirtual content that conflicts with real content may remind a user ofthe distinction between virtual and real content and diminish theimmersion of the user. Further, in some cases, latency can result inmotion sickness, headaches, or other negative physical experiences forsome users. Computational inefficiency can produce exacerbated problemsin embodiments where mixed reality system 112 is a mobile system thatdepends on a limited power source (e.g., a battery). Systems and methodsdescribed herein can produce an improved user experience as a result ofmore accurate, computationally efficient, and/or lower latency SLAM.

Visual-Inertial Odometry

FIG. 5 illustrates an exemplary pipeline for visual-inertial odometry(“VIO”) using bundle adjustments and a standalone gravity estimation. Atstep 504, sensor inputs from one or more sensors 502 can be processed.In some embodiments, sensor 502 can be an IMU, and processing IMU inputat step 504 can include pre-integrating the IMU measurement.Pre-integrating IMU measurements can include determining a singlerelative motion constraint from a series of inertial measurementsobtained from the IMU. It may be desirable to pre-integrate IMUmeasurements to reduce the computational complexity of integrating theentire series of inertial measurements. For example, inertialmeasurements collected between sequential frames (which can also bekeyframes) captured in a video recording may include data about theentire path taken by the IMU. Keyframes can be specially selected framesbased on time (e.g., time since previous keyframe selection), identifiedfeatures (e.g., having sufficient new identified features when comparedto previous keyframe), or other criteria. However, in some embodiments,VIO methods may only need data about the starting point (e.g., at thefirst frame) and the ending point (e.g., at the second frame). In someembodiments, VIO methods may only need data about a current point intime (e.g., the most recent frame) and a previous state (e.g., theprevious frame). VIO computations may be simplified by pre-integratinginertial measurement data to produce a single relative motion constraint(e.g., from the first frame to the second frame). Pre-integratedinertial measurements may further be combined with other pre-integratedinertial measurements without needing to repeat the preintegrationacross both sets of measurements. This can be useful, for example, wheninertial measurements between keyframes are pre-integrated, but it islater determined that a keyframe should no longer be used (e.g., becauseit was deleted as redundant or obsolete, or if the optimization is firstperformed on a first subset of keyframes and then performed on adifferent set of keyframes while reusing the results of the firstoptimization). For example, if inertial measurements between frame 1 andframe 2 have already been pre-integrated, and inertial measurementsbetween frame 2 and frame 3 have already been pre-integrated, both setsof pre-integrated measurements can be combined without performing a newpreintegration if frame 2 is removed from the optimization. It is alsocontemplated that this can be performed across any number of frames.

In some embodiments, step 504 can include tracking identified featuresin camera frames, where camera frames can be sensor inputs from sensor502. For example, each image can be fed through a computer visionalgorithm to identify features within the image (e.g., corners andedges). Adjacent or near-adjacent frames can be compared with each otherto determine a correspondence between features across frames (e.g., oneparticular corner can be identified in two adjacent frames). In someembodiments, adjacency can refer to temporal adjacency (e.g.,consecutively captured frames) and/or spatial adjacency (e.g., framesthat capture similar features that may not have been capturedconsecutively). In some embodiments, a corresponding feature can besearched for within a given radius of an identified feature. The searchradius can be fixed or a function of a velocity between the frames(e.g., calculated by integrating linear acceleration measured by theIMU).

At step 506, VIO computations can be run. VIO can be a method toobserve, track, and locate features in an environment for use in SLAM.VIO can include information streams from multiple types of sensors. Forexample, VIO can include information streams from visual sensors (e.g.,one or more cameras) and inertial sensors (e.g., an IMU). In one examplemethod of VIO, a camera mounted on a moving mixed reality system (e.g.,mixed reality system 112, 200) can record/capture multiple images (e.g.,frames in a video recording). Each image can be fed through a computervision algorithm to identify features within the image (e.g., cornersand edges). Adjacent or near-adjacent frames can be compared with eachother to determine a correspondence between features across frames(e.g., one particular corner can be identified in two sequentialframes). In some embodiments, a three-dimensional map can be constructed(e.g., from stereoscopic images), and identified features can be locatedin the three-dimensional map.

In some embodiments, inertial information from an IMU sensor can becoupled with visual information from one or more cameras to verifyand/or predict an expected position of an identified feature acrossframes. For example, IMU data gathered between two captured frames caninclude linear acceleration and/or angular velocity. In embodimentswhere the IMU is coupled to one or more cameras (e.g., both are embeddedin a wearable head device), IMU data can determine movements for the oneor more cameras. This information can be used to estimate where in acaptured image an identified feature may be seen based on its estimatedlocation in a three-dimensional map and based on the movement of the oneor more cameras. In some embodiments, the newly estimated position of anidentified feature in a three-dimensional map can be projected onto atwo-dimensional image to replicate how one or more cameras may capturethe identified feature. This projection of an estimated location of anidentified feature can then be compared with a different image (e.g., asubsequent frame). The difference between a projection of an estimatedlocation and an observed location can be a reprojection error for anidentified feature.

An IMU can also contribute errors to a VIO optimization. For example,sensor noise can contribute to errors in IMU data. IMU sensor outputscan also include bias (e.g., an offset in recorded measurements that maybe present even with no movement), which can be a function of physicalproperties of an IMU (e.g., temperature or mechanical stress). In someembodiments, errors in IMU data can accumulate as a result ofintegrating IMU data over time. A reprojection error can also be afunction of an inaccurate estimate of an identified feature's locationin a three-dimensional map. For example, if an originally assumedposition of an identified feature is incorrect, a newly estimatedposition for that feature after movement can also be incorrect, andconsequently a projection of the newly estimated position onto atwo-dimensional image can also be incorrect. It can be desirable for aVIO optimization to minimize overall errors, which can includereprojection errors and IMU errors.

FIGS. 6A-6B illustrate example graphs of a VIO computation. Theexemplary graphs can visually depict a non-linear factorization of afunction of several variables. For example, variables (e.g., 602 a and602 b) can be represented as circular nodes, and functions of variables(e.g., 604, 606, and 610 a, also called factors) can be represented assquare nodes. Each factor can be a function of any attached variables.In the depicted embodiment, nodes 602 a and 602 b can represent dataassociated with an image captured at t=1. Data associated with an imagecaptured at t=2 and an image captured at t=3 are displayed in theexample embodiment as well. Node 602 a can represent variableinformation including bias (e.g., IMU bias) and velocity, which can beobtained by integrating acceleration measurements over time. Node 602 acan represent a bias of an IMU and velocity of a camera affixed to anIMU at a time t=1 when the camera captured an image. Node 602 b canrepresent a pose estimation at a time t=1. Pose estimation can includean estimate of a camera's position and orientation in three-dimensionalspace (which can be a result of VIO). Node 604 can represent aperspective-n-points (“PnP”) term at time t=1. A PnP term can includeestimates of an identified feature's position and orientation inthree-dimensional space (e.g., a corner of an object identified in animage). Node 606 can include IMU measurements captured between time t=1and time t=2. IMU measurements at node 606 can optionally bepre-integrated to reduce computational load. Node 608 can represent agravity estimate for a real environment. A gravity estimate can includean indication of an estimated direction of gravity (e.g., a vector)based on inertial measurements from an IMU.

Nodes 610 a and 610 b can include a marginalization prior. In someembodiments, a marginalization prior can include marginalizedinformation about some or all previously captured frames. In someembodiments, a marginalization prior can contain estimates of some orall previous camera states (which can include pose data), gravityestimates, and/or IMU extrinsics. In some embodiments, a marginalizationprior can include an information matrix that can capture dependencies ofthe state to previous visual and/or inertial measurements. In someembodiments, a marginalization prior can include one or more errorvectors holding residual errors at a linearization point. It can bebeneficial to use a marginalization prior for several reasons. Oneadvantage can be that a marginalization term can allow an optimizationproblem to have a fixed number of variables even if the optimization hasno predetermined limits. For example, VIO may be run on any number offrames, depending on how long a user may use a mixed reality systemrunning VIO. A VIO optimization may therefore require optimizing manythousands of frames, which can exceed computational limits of a portablesystem. A marginalization prior can provide information about some orall previous frames in a single term, such that an optimization problemcan compute with far fewer variables (e.g., three variables: amarginalization prior and the two most recent frames). Another advantagecan be that a marginalization prior can take into account a long historyof previous frames. For example, computing limits may demand that onlyrecent frames (e.g., the three most recent frames) can be optimized. Asa result, the optimization can suffer from drift, where an errorintroduced in one frame can continue to be propagated forward. Amarginalization prior that approximates information of many previousframes can be less susceptible to errors introduced by single frames. Insome embodiments, marginalization prior 610 a can approximateinformation from all frames captured prior to a time t=1.

FIG. 6B illustrates an exemplary embodiment where a frame captured att=1 and data associated with the frame captured at t=1 is marginalizedinto marginalization prior node 610 b, which can include data aboutmarginalization prior 610 a and data about the newly marginalized framecaptured at t=1. In some embodiments, VIO can utilize a sliding windowsize, for example of two frames, in addition to a marginalization priorthat marginalizes previous frames. As a new frame is added to the VIOoptimization (which can minimize error), the oldest frame can bemarginalized into the marginalization prior term. A sliding window ofany size can be used; larger window sizes can produce a more accurateVIO estimation, and smaller window sizes can produce a more efficientVIO calculation. In some embodiments, a VIO optimization can fix nodesrepresenting PnP terms (e.g., node 604), and optimize only nodesrepresenting pose (or state) estimates, gravity estimates, inertialmeasurements, and/or IMU extrinsics (which can be included in node 602a). A state estimate can include a pose estimate in addition to avelocity estimate and a bias estimate.

In some embodiments, each frame factored into a VIO estimate of statecan have an associated weight. For example, minimizing error can resultin frames with many identified features being weighted more heavily inthe optimization. Because errors can originate from visual information(e.g., reprojection errors) and/or inertial information (e.g., IMUbias), a frame with a large number of identified features may beweighted too heavily, thereby diminishing the relative weight ofinertial measurements during the minimization process. It can bedesirable to dampen the scaling of a frame's weight with identifiedfeatures because such scaling can reduce the weight of IMU data bycomparison, and because the scaling can assign too much weight to oneframe relative to other frames. One solution to dampen the weightscaling is to divide the weight of each identified feature by the squareroot of the sum of all weights of all identified features in a frame.Each dampened reprojection error can then be minimized in the VIOoptimization, thereby dampening the scaling of visual information withmore identified features.

In some embodiments, each identified feature can have a weightassociated with a confidence in the identified feature. For example, areprojection error between an identified feature and its expectedlocation based on an observation of a corresponding feature in aprevious frame and an estimated motion between the frames can beweighted (e.g., larger reprojection errors can be assigned a lowerweight). In another example, a reprojection error can be removed fromcalculations as an outlier based on a distribution of measuredreprojection errors in an image. For example, the highest 10% ofreprojection errors can be eliminated from calculations as outliers,although any threshold can be used, including dynamic thresholds.

In some embodiments, it can be desirable to modify how a marginalizationprior is updated if a mixed reality system (e.g., mixed reality system112, 200) is static and unmoving. For example, if a mixed reality systemis set on a table but continues running, it can continue to observefeatures and inertial measurements, which can lead to overconfidence ina state estimation due to the repeated measurements. It can therefore bedesirable to stop updating an information matrix (which can includeuncertainties) in a marginalization prior if it is detected that a mixedreality system has been static for a threshold amount of time. A staticposition can be determined from IMU measurements (e.g., recording nosignificant measurements outside the noise range), from visualinformation (e.g., frames continue to show no movement in identifiedfeatures), or other suitable methods. In some embodiments, othercomponents of a marginalization prior (e.g., error vector, estimation ofstate) can continue to be updated.

Bundle Adjustment and Gravity Estimation

Referring back to FIG. 5, keyrig insertion can be determined at step508. It can be beneficial to use keyrigs for gravity estimation, bundleadjustment, and/or VIO because the use of keyrigs can lead to sparserdata over longer timeframes without increasing computational load. Insome embodiments, a keyrig can be a set of keyframes from a multi-camerasystem (e.g., a MR system with two or more cameras), which may have beencaptured at a certain time. In some embodiments, a keyrig can be akeyframe. Keyrigs can be selected based on any criteria. For example,keyrigs can be selected in the time-domain based on elapsed time betweenkeyrigs (e.g., one frame every half-second can be selected as a keyrig).In another example, keyrigs can be selected in the spatial-domain basedon identified features (e.g., a frame can be selected as a keyrig if ithas sufficiently similar or different features as compared to theprevious keyrig). Keyrigs can be stored and saved to memory.

In some embodiments, dense keyrig insertion (which can be useful for agravity estimate) can be performed (e.g., if standard keyrig insertionprovides data that is too sparse). In some embodiments, thresholdconditions can be met before dense keyrig insertion is performed. Onethreshold condition can be if the VIO optimization is still accepting agravity input. Another threshold condition can be if a threshold amountof time (e.g., 0.5 seconds) has passed since the last keyrig wasinserted. For example, inertial measurements may only be valid overshort lengths of time as a result of IMU errors (e.g., bias or drift),so it may be desirable to limit the amount of time between keyrigs wheninertial measurements are collected (and optionally pre-integrated).Another threshold condition can be whether there is sufficient motionbetween the most recent keyrig candidate and the most recent keyrig(i.e., it can be desirable to have sufficient motion to make allvariables observable). Another threshold condition can be if the newestkeyrig candidate is sufficiently high quality (e.g., if the new keyrigcandidate has a sufficiently high ratio of reprojection inliers toreprojection outliers). Some or all of these threshold conditions may berequired before a dense keyrig insertion, and other threshold conditionsmay be used as well.

At step 510, a keyrig buffer can be maintained. A keyrig buffer caninclude memory configured to store inserted keyrigs. In someembodiments, keyrigs can be stored with associated inertial measurementdata (e.g., raw inertial measurements or pre-integrated inertialmeasurements) and/or associated timestamps (e.g., of when the keyrig wascaptured). It can also be determined whether a time gap between keyrigsis sufficiently short to maintain a validity for pre-integratinginertial measurements. If it is determined that the time gap is notsufficiently short, the buffer can be reset to avoid a poor estimation(e.g., a poor gravity estimation). Keyrigs and associated data can bestored in database 511.

At step 512, a bundle adjustment can be performed. A bundle adjustmentcan optimize the estimates of camera poses, states, feature positions,and/or other variables based on repeated observations of identifiedfeatures across frames to increase an accuracy of and confidence in theestimates (e.g., of the positions of the identified features). Althoughthe same identified feature may be observed multiple times, eachobservation may not be consistent with other observations as a result oferrors (e.g., IMU biases, feature detection inaccuracy, cameracalibration error, computational simplifications, etc.). It cantherefore be desirable to estimate a likely position of an identifiedfeature in a three-dimensional map using multiple observation of theidentified feature while minimizing the error of input observations.Bundle adjustment can include optimizing frames (or keyrigs) over asliding window (e.g., of thirty keyrigs). This can be referred to asfixed-lag smoothening, and can be more accurate than using Kalmanfilters, which may accumulate past errors. In some embodiments, a bundleadjustment can be a visual-inertial bundle adjustment, wherein thebundle adjustment is based on visual data (e.g., images from a camera)and inertial data (e.g., measurements from an IMU). A bundle adjustmentcan output a three-dimensional map of identified features that can bemore accurate than a three-dimensional map generated by VIO. A bundleadjustment can be more accurate than a VIO estimation because a VIOestimation may be performed on a per-frame basis, and a bundleadjustment may be performed on a per-keyrig basis. In some embodiments,a bundle adjustment can optimize map points (e.g., identified features)in addition to a position and/or orientation of a MR system (which mayapproximate a position and/or orientation of a user). In someembodiments, a VIO estimation may optimize only a position and/ororientation of a MR system (e.g., because the VIO estimation may takemap points as fixed inputs). Utilizing keyrigs can allow input data tospan a longer timeframe without increasing the computational load, whichcan result in an increase in accuracy. In some embodiments, bundleadjustment may be performed remotely on a more powerful processor,allowing a more accurate estimation (due to more optimized frames) thancompared to VIO.

In some embodiments, a bundle adjustment can include minimizing errors,which can include visual errors (e.g., reprojection errors) and/orinertial errors (e.g., errors resulting from an estimate of anidentified feature's position based on a previous keyrig and movement tothe next keyrig). Minimizing errors can be done by identifying a rootmean square of errors, and optimizing estimates to achieve the lowestaverage root mean square of all errors. It is also contemplated thatother minimization methods may be used. In some embodiments, individualmeasurements can be assigned individual weights (e.g., measurements canbe weighted based on a confidence in the accuracy of the measurement).For example, measurements from images captured from more than one cameracan be weighted according to a quality of each camera (e.g., a higherquality camera can produce measurements with more weight). In anotherexample, measurements can be weighted according to a temperature of asensor at a time the measurement was recorded (e.g., a sensor mayperform optimally within a specified temperature range, so measurementstaken within that temperature range may be weighted more heavily). Insome embodiments, depth sensors (e.g., LIDAR, time of flight cameras,etc.) can provide information in addition to visual and inertialmeasurements. Depth information can also be included in bundleadjustment by also minimizing errors associated with depth information(e.g., when depth information is compared to an estimatedthree-dimensional map built from visual and inertial information). Insome embodiments, a global bundle adjustment can be performed, usingbundle adjustment outputs as inputs (instead of, for example, keyrigs)to further improve accuracy.

FIG. 7A illustrates an exemplary decision process for performing bundleadjustment. At step 702, a new keyrig can be added to the sliding windowfor optimization. At step 704, the time intervals between each keyrig inthe sliding window can be evaluated. If none of the time intervals areabove a certain static or dynamic time threshold (e.g., 0.5 seconds), avisual-inertial bundle adjustment can be performed at step 706 usinginertial measurements from database 705 and keyrigs (which can beimages) from database 712. Database 705 and database 712 can be the samedatabase or separate databases. In some embodiments, if at least onetime interval between sequential keyrigs is above a certain static ordynamic time threshold, a spatial bundle adjustment can be performed atstep 710. It can be beneficial to exclude inertial measurements if atime interval is above a static or dynamic time threshold because IMUmeasurements may only be valid for integration over a short period oftime (due to, for example, sensor noise and/or drift). A spatial bundleadjustment may optionally rely on a different set of keyrigs than avisual-inertial bundle adjustment. For example, the sliding window maychange from being fixed to a certain time or a certain number of keyrigsto being fixed to the spatial domain (e.g., the sliding window is fixedto a certain amount of movement). At step 708, the oldest keyrig can beremoved from the sliding window.

FIG. 7B illustrates an exemplary decision process for performing bundleadjustment. At step 720, a new keyrig can be added to the sliding windowfor optimization. At step 722, temporally recent keyrigs can beretrieved from a database of keyrigs 730. For example, a number (e.g.,five) of the most recently captured keyrigs (e.g., based on associatedtimestamps) may be retrieved. At step 724, it can be determined if atime interval between each retrieved keyrig is below a static or dynamicthreshold (e.g., 0.5 seconds). If each time interval between capturedkeyrigs is below a static or dynamic threshold, a visual-inertial bundleadjustment may be performed at step 726, which may utilize inertialmeasurements in addition to visual information from the keyrigs. If atleast one time interval between captured keyrigs is above a static ordynamic threshold, at step 728 spatially close keyrigs may be retrievedfrom database 730. For example, keyrigs with a threshold number ofidentified features corresponding to identified features in the newestkeyrig can be retrieved. At step 728, a spatial bundle adjustment may beperformed, which may use visual information from keyrigs, and may notuse inertial information for the bundle adjustment.

Other decision processes can also be used for performing bundleadjustment. For example, at step 704 and/or 724, it can be determinedwhether any time interval between sequential keyrigs exceeds a static ordynamic threshold of time. If at least one time interval is determinedto exceed the threshold, inertial measurements can be ignored betweenthe two relevant keyrigs, but can still be used for all remainingkeyrigs that comply with the time interval threshold. In anotherexample, if a time interval is determined to exceed the threshold, oneor more additional keyrigs can be inserted between the two relevantkeyrigs, and a visual-inertial bundle adjustment can be performed. Insome embodiments, keyrigs in the keyrig buffer or stored in database 511and/or 730 can be updated with the results of the bundle adjustment.

Referring back to FIG. 5, at step 514, a standalone gravity estimationcan be performed. A standalone gravity estimation performed at step 514can be more accurate than a VIO gravity estimation determined at step506, for example, because it may be performed on a more powerfulprocessor or over a longer timeframe, allowing for optimization overadditional variables (e.g., frames or keyrigs). A standalone gravityestimation can utilize keyrigs (which can comprise keyframes) toestimate gravity (e.g., a vector), which can be used for SLAM and/orVIO. Keyrigs can be beneficial because they can allow for a standalonegravity estimation to be performed over a longer period of time withoutexceeding computational limits. For example, a standalone gravityestimation over 30 s may be more accurate than a standalone gravityestimation over 1 s, but a 30 s estimation may require optimizing 900frames if a video was recorded at 30 fps. Keyrigs can be obtained atsparser intervals (e.g., twice per second) such that the gravityestimation may only require optimizing 60 frames. In some embodiments,keyrigs used for a standalone gravity estimation can be the result of adense keyrig insertion (which may be performed at step 508). A gravityestimate can also utilize simple frames. It can be desirable to estimatea direction for gravity to anchor a display of virtual content thatcorresponds to real content. For example, a poor gravity estimate canlead to virtual content appearing tilted relative to the real content.Although an IMU can provide inertial measurements which can includegravity, the inertial measurements may also include all other motion(e.g., actual motion or noise), which may obscure the gravity vector.

FIG. 8 illustrates an exemplary graph of a standalone gravityestimation. The exemplary graph can visually depict a non-linearfactorization of a function of several variables. For example, variables(e.g., 802 a and 802 b) can be represented as circular nodes, andfunctions of variables (e.g., 804, also called factors) can berepresented as square nodes. Each factor can be a function of anyattached variables. Nodes 802 a and 802 b can represent data associatedwith a keyrig captured at time i=0. Node 802 a can include datarepresenting an IMU state, which can be estimates of errors in the IMUmeasurements. The IMU state can be an output from a VIO method. Node 802b can include data representing a keyrig pose associated with aparticular keyrig. The keyrig pose can be based on the output of thebundle adjustment. Node 804 can include an IMU term edge, which caninclude pre-integrated inertial movements. Node 804 can also define anerror function relating other attached nodes to each other. Node 806 caninclude data representing IMU extrinsics (which can correspond to aprecision and orientation of the IMU with respect to a mixed realitysystem), and node 808 can include a gravity estimate. The gravityestimation optimization can include minimizing the error function atnode 804. In some embodiments, nodes related to keyrig pose and IMUextrinsics (e.g., nodes 802 b and 806) can be fixed, and nodes relatedto IMU state and gravity (e.g., nodes 802 a and 808) can be optimized.

Referring back to FIG. 5, at step 515, results from the standalonegravity estimation and from the bundle adjustment can be applied to theVIO outputs. For example, the difference between the VIO gravityestimate and the standalone gravity estimate and/or the differencebetween the VIO pose estimate and the bundle adjustment pose estimatecan be represented by a transformation matrix. The transformation matrixcan be applied to the VIO pose estimation and/or the marginalizationprior's pose estimation. In some embodiments, a rotational component ofthe transformation matrix can be applied to the state estimated by theVIO and/or the VIO's gravity estimate. In some embodiments, a standalonegravity estimation may not be applied to correct a VIO gravity estimateif a generated map has become too large (i.e., if the standalone gravityestimate has to be applied to too many frames, it may be computationallyinfeasible). In some embodiments, blocks in group 516 can be performedat a separate location than blocks in group 518. For example, group 516can be performed at a wearable head device, which may include apower-efficient processor and a display. Group 518 can be performed atan attached device (e.g., a hip-wearable device) that can include a morepowerful processor. It can be desirable to perform certain calculations(e.g., those in group 516) in approximately real-time so that a user canhave low-latency visual feedback for the virtual content. It can also bedesirable to perform more accurate and computationally expensivecalculations in parallel and back-propagate corrections to maintainlong-term accuracy of the virtual content.

Dual IMU Slam

In some embodiments, two or more IMUs can be used for SLAM calculations.The addition of a second IMU can improve accuracy of SLAM computations,which can result in less jitters and/or drift in virtual content. Theaddition of a second IMU in SLAM computations may also be advantageousin situations when information associated with map points may not besufficient for a more accurate SLAM computation (e.g., low texture(e.g., a wall lacking geometrical or visual features, such as a flatwall in one color), low light, low light and low texture). In someexamples, a reduction of 14-19% for drift and 10-20% for jitter may beachieved using two IMUs to compute SLAM, compared to using one IMU.Drift and jitter may be measured relative to an actual position (e.g.,to an actual position of an object in a mixed reality environment) inarcminutes.

In some embodiments, the second IMU may be used in low light or lowtexture situations, and the second IMU may not be used in situationswhen lighting and/or texture of a mixed reality environment aresufficient. In some embodiments, one or more visual metrics andinformation from sensors of the mixed reality system are used todetermine whether the lighting and/or texture of the mixed realityenvironment are sufficient (e.g., sufficient texture is determined fromobjects of a mixed reality environment; sufficient lighting in a mixedreality environment is determined). For example, a sensor of a MR systemmay be used to capture lighting and/or texture information associatedwith a mixed reality environment and the captured information may becompared with a lighting and/or texture threshold to determine if thelighting and/or texture is sufficient. If the lighting and/or textureare determined to be not sufficient, then the second IMU may be used forpreintegration term calculations (e.g., for better accuracy, to reducepotential jitter and/or drift), as disclosed herein. In someembodiments, computations with one IMU and computations with two IMUsare compared, and if the differences between the computations are withina threshold, then using one IMU for SLAM computation may be sufficientin these instances. As an exemplary advantage, the ability to use oneIMU in situations when lighting and/or texture of a mixed realityenvironment are determined to be sufficient may reduce power consumptionand reduce computation time.

In some embodiments, a second IMU may enable repeated measurements to betaken of the same value, which may increase confidence in the measuredvalue. For example, a first IMU may measure a first angular velocity,and a second IMU may measure a second angular velocity at the same time.

The first IMU and the second IMU are may be coupled to a same rigid body(e.g., the body experiences negligible deformation; the body may be aframe of a wearable head device). The first angular velocity associatedwith the first IMU and the second angular velocity associated with thesecond IMU can both be measurements of the same ground-truth angularvelocity. In some embodiments, repeated measurements of the same valuecan produce a more accurate estimation of the ground-truth value bycanceling out noise in each individual measurement. In some embodiments,coupling the two IMUs to a same rigid body may facilitate SLAMcomputations in a two-IMU system, as described herein. Becauselow-latency can be of high importance to SLAM calculations, it can bedesirable to develop systems and methods of incorporating additionalinertial information in a computationally efficient manner whilepreserving the accuracy gains of the additional data.

FIG. 9 illustrates an exemplary IMU configuration in a mixed realitysystem, according to some embodiments. In some embodiments, MR system900 (which can correspond to MR systems 112, 200) can be configured toinclude IMU 902 a and IMU 902 b. In some embodiments, the IMUs 902 a and902 b rigidly coupled to the mixed reality system (e.g., attached to aframe of the mixed reality system) such that the velocities of the IMUsare coupled. For example, the relationship between the two velocitiesmay be computed using known values, such as angular velocity and vectorsassociated with the respective IMU positions. As described herein, asystem comprising two velocity-coupled IMU may advantageously reduce thecomplexity of computation of preintegration terms associated with thesystem while generally observing better computational accuracy comparedto a one-IMU system, particularly in low light and/or low texturesituations in a mixed reality environment.

In some embodiments, MR system 900 can be configured such that IMU 902 ais as close as possible to camera 904 a, and that IMU 902 b is as closeas possible to camera 904 b. In some embodiments, cameras 904 a and 904b can be used for SLAM (e.g., cameras 904 a and 904 b can be used forobject/edge recognition and/or for visual components of VIO). It can bedesirable to configure MR system 900 such that an IMU is as close aspossible to a SLAM camera so as to accurately track movement experiencedby a SLAM camera (e.g., by using a movement of an IMU as a proxy for amovement of a SLAM camera).

FIG. 10 illustrates an exemplary IMU configuration in a mixed realitysystem, according to some embodiments. In some embodiments, two IMUsensors (e.g., IMU 1002 and IMU 1004) can generally provide two IMU termedges and/or preintegration terms. For example, components of apreintegration term associated with IMU 1002 can be represented byequations (1), (2), and (3), where R_(wI) ₁ (t+Δt) can represent aquaternion (which may represent a rotation and/or an orientation of a MRsystem) corresponding to IMU 1002, where ω_(WI) ₁ ^(I) ¹ (t) canrepresent an angular velocity measured by IMU 1002 about a point W(which may exist on a MR system and/or be a center of a MR system),where v₁ ^(W)(t+Δt) can represent a linear velocity at IMU 1002 relativeto point W, where a₁ ^(W)(t) can represent a linear acceleration at IMU1002 relative to point W, and where p₁ ^(W)(t+Δt) can represent alocation of IMU 1002 relative to point W.

$\begin{matrix}{{R_{{WI}_{1}}\left( {t + {\Delta t}} \right)} = {{R_{{WI}_{1}}(t)}{{Exp}\left( {{\omega_{{WI}_{1}}^{I_{1}}(t)}{\Delta t}} \right)}}} & {{Equation}\mspace{11mu}(1)} \\{{\nu_{1}^{W}\left( {t + {\Delta t}} \right)} = {{\nu_{1}^{W}(t)} + {{a_{1}^{W}(t)}{\Delta t}}}} & {{Equation}\mspace{14mu}(2)} \\{{p_{1}^{W}\left( {t + {\Delta t}} \right)} = {{p_{1}^{W}(t)} + {{\nu_{1}^{W}(t)}\Delta t} + {\frac{1}{2}{a_{1}^{W}(t)}\Delta t^{2}}}} & {{Equation}\mspace{14mu}(3)}\end{matrix}$

Similarly, equations (4), (5), and (6) can represent components of apreintegration term associated with IMU 1004.

$\begin{matrix}{{R_{{WI}_{2}}\left( {t + {\Delta t}} \right)} = {{R_{{WI}_{2}}(t)}{{Exp}\left( {{\omega_{{WI}_{2}}^{I_{2}}(t)}{\Delta t}} \right)}}} & {{Equation}\mspace{11mu}(4)} \\{{\nu_{2}^{W}\left( {t + {\Delta t}} \right)} = {{\nu_{2}^{W}(t)} + {{a_{2}^{W}(t)}{\Delta t}}}} & {{Equation}\mspace{14mu}(5)} \\{{p_{2}^{W}\left( {t + {\Delta t}} \right)} = {{p_{2}^{W}(t)} + {{\nu_{2}^{W}(t)}\Delta t} + {\frac{1}{2}{a_{2}^{W}(t)}\Delta t^{2}}}} & {{Equation}\mspace{14mu}(6)}\end{matrix}$

Although t and Δt are used to described a respective IMU's rotation,angular velocity, and angular acceleration at a particular time, it isunderstood that the different quantities may not captured at exactly asame time. For example, due to hardware timing, there may be a delaybetween data capture or sampling between the two IMUs (e.g., 200 ms). Inthese instances, the MR system may synchronize the sets of data betweenthe two IMU to account for this delay. As another example, IMU dataassociated with the different quantities may be sampled or captured atdifferent times during a same clock cycle of the system. The period ofthe clock cycle may be determined by the system's timing resolutionrequirements.

In some embodiments, a solution for the equations (1)-(6) may be solvedto compute preintegration terms associated with the first and secondIMUs. For example, the solution may be using regression analysis (e.g.,least square) or other suitable methods to reduce error associated withthe solution of the system of equations.

In some embodiments, a preintegration term associated with IMU 1002 anda preintegration term associated with IMU 1004 can be kinematicallyconstrained if IMU 1002 and IMU 1004 are rigidly coupled to each other(e.g., via rigid body 1006, which can correspond to MR system 900). Inthese instances, variables associated with equations (1)-(6) may bereduced due to this coupling. In some embodiments, a rigid couplingbetween IMU 1002 and IMU 1004 can allow both preintegration terms to beexpressed in the same variables. Equation (7) can represent arelationship between variables measured at IMU 1002 and variablesmeasured at IMU 1004 (due to rigid coupling), where

can represent a positional relationship (e.g., a vector) between IMU1002 and IMU 1004 and co can represent an angular velocity associatedwith the mixed reality system (e.g., angular velocity associated withIMU 1002, angular velocity associated with IMU 1004, average angularvelocity associated with IMU 1002 and IMU 1004, a noise-reduced angularvelocity associated with the system, a bias-removed angular velocityassociated with the system).

v ₂ ^(W) =v ₁ ^(W)+ω×

  Equation (7):

Using the kinematic relationship between IMU 1002 and IMU 1004,equations (8), (9), and (10) can replace equations (4), (5), and (6) ascomponents of a preintegration term for IMU 1004.

$\begin{matrix}{{R_{{WI}_{2}}\left( {t + {\Delta t}} \right)} = {{R_{{WI}_{2}}(t)}{{Exp}\left( {{\omega_{{WI}_{2}}^{I_{2}}(t)}\Delta t} \right)}}} & {{Equation}\mspace{11mu}(8)} \\{{{{\nu_{1}^{W}\left( {t + {\Delta t}} \right)} + {{R_{{WI}_{1}}\left( {t + {\Delta t}} \right)}{\omega_{{WI}_{1}}^{I_{1}}\left( {t + {\Delta t}} \right)} \times \overset{\_}{I_{1}I_{2}}}} = {{\nu_{1}^{W}(t)} + {{R_{{WI}_{1}}(t)}{\omega_{{WI}_{1}}^{I_{1}}(t)} \times \overset{\_}{I_{1}I_{2}}} + {{a_{2}^{W}(t)}\Delta t}}}{{p_{2}^{W}\left( {t + {\Delta t}} \right)} = {{p_{2}^{W}(t)} + {\left\lbrack {{\nu_{1}^{W}(t)} + {{R_{{WI}_{1}}(t)}{\omega_{{WI}_{1}}^{I_{1}}(t)} \times \overset{\_}{I_{1}I_{2}}}} \right\rbrack{\Delta t}} + {\frac{1}{2}{a_{2}^{W}(t)}\Delta t^{2}}}}} & {{Equation}\mspace{11mu}(9)}\end{matrix}$

As exemplified above, by rigidly coupling IMU 1002 and IMU 1004, arelationship between the two IMUs may be derived (e.g., using equation(7)), and a set of IMU equations (e.g., equations (4), (5), and (6))associated with an IMU preintegration term may be advantageouslysimplified (e.g., to equations (8), (9), and (10)) to reduce complexityof computation of preintegration terms associated with the two IMUswhile generally observing better computational accuracy compared to aone-IMU system.

Although equations (4), (5), and (6) are simplified in terms of thefirst IMU, it is understood that equations (1), (2), and (3) may besimplified (e.g., in terms of the second IMU) in instead to perform asimilar calculation. Although the angular velocity associated with IMU1002 is used in equations (8), (9), and (10), it is understood that adifferent angular velocity associated with the mixed reality system maybe used for calculating preintegration terms. For example, an averageangular velocity between IMU 1002 and IMU 1004 may be used in equations(8), (9), and (10).

The rigidity of the IMUs' (e.g., IMU 902 a, IMU 902 b, IMU 1002, IMU1004) coupling the MR system may change over time. For example,mechanisms used to attach the IMUs to a frame of the MR system mayexperience plastic or inelastic deformations. These deformations mayaffect the mathematical relationship between the two IMUs. Specifically,these deformations may affect the accuracy of equation (7), and theaccuracy of the relationship between the set of equations associatedwith a first IMU (e.g., IMU 902 a, IMU 1002) and the set of equationsassociated with a second IMU (e.g., IMU 902 b, IMU 1004) derived fromequation (7). These deformation may affect the accuracy ofpreintegration terms associated with the IMUs. In some embodiments, theposition of the IMUs may be calibrated prior to SLAM computation. Forexample, prior to a SLAM computation, a current position of an IMU(e.g., obtained by using sensors of the MR system) may be compared witha predetermined value (e.g., a known IMU position, an ideal IMUposition, a manufactured IMU position), and the difference (e.g., anoffset) may be accounted for in the SLAM computation (e.g., removing thedifference in equation (7)). By calibrating the IMUs prior to a SLAMcomputation and accounting for potential deformations in IMU couplings,accuracy associated preintegration term and SLAM computations may beadvantageously increased.

FIG. 11 illustrates an exemplary graphical representation of SLAM,according to some embodiments. The graphical representation in FIG. 11can depict a non-linear factorization of a function of severalvariables. For example, variables (e.g., 1110, 1112, 1114, 1116, and1122) can be represented as circular nodes, and functions of variables(e.g., 1102, 1118, and 1120, also called factors) can be represented assquare nodes. Each factor can be a function of any (or all) attachedvariables.

In some embodiments, state 1102 can represent a system state (e.g., astate of an MR system) and/or any variables in the system state at timet=1. Similarly, state 1104 can represent a system state and/or anyvariables in the system state at time t=2, and state 1106 can representa system state and/or any variables in the system state at time t=3. Asystem state can correspond to a keyrig captured at that time. A systemstate can include (and/or be defined by) the state of one or morevariables within the state. For example, state 1102 can include PnP term1108. In some embodiments, state 1102 can include pose estimate 1110. Insome embodiments, state 1102 can include bias term 1112 of a first(and/or left) IMU (which can correspond to IMU 902 a or IMU 1002). Insome embodiments, bias term 1112 can include a bias value for a linearaccelerometer and a gyroscope. In some embodiments, bias term 1112 caninclude a bias value for each linear accelerometer and gyroscopecorresponding to individual measurements axes. In some embodiments,state 1102 can include bias term 1114 of a second (and/or right) IMU(which can correspond to IMU 902 b or IMU 1004). Bias term 1114 caninclude similar corresponding bias values as bias term 1112. In someembodiments, state 1102 can include velocity term 1116. Velocity term1116 can include an angular velocity of the system. In some embodiments,if the system is substantially a rigid body, the angular velocity may beone of angular velocity associated with the first IMU, angular velocityassociated with the second IMU, average angular velocity associated withthe first and second IMUs, a noise-reduced angular velocity associatedwith the system, and a bias-removed angular velocity associated with thesystem. In some embodiments, velocity term 1116 can include one or morelinear velocity values corresponding to one or more locations in thesystem (e.g., a linear velocity value at each IMU in the system). Insome embodiments, state 1102 can include stateless term 1122. Statelessterm 1122 can include one or more variables that may not depend on aparticular state. For example, stateless term 1122 can include a gravityvariable, which may include an estimated direction of gravity. In someembodiments, stateless term 1122 can include IMU extrinsics (e.g., arelative position of IMU 904 a or IMU 1002 and/or 904 b or 1004 withinMR system 900).

In some embodiments, two preintegration terms can relate two systemstates to each other. For example, preintegration term 1118 andpreintegration term 1120 can relate state 1102 to state 1104. In someembodiments, preintegration term 1118 (which can correspond to IMU 904 aor IMU 1002) and preintegration term 1120 (which can correspond to IMU904 b or IMU 1004) can be functions of the same sets of variables. Thisstructuring of a non-linear optimization calculation can provide severaladvantages. For example, the second preintegration term (as compared toa non-linear factorization using a single IMU in FIG. 8) may not requirea proportional increase in compute power because the secondpreintegration term may be kinematically constrained to the firstpreintegration term, as described herein. However, adding data from asecond IMU can yield improvements in jitter and/or drift as compared tosingle IMU factorizations.

FIG. 12 illustrates an exemplary process for presenting virtual content,according to some embodiments. For brevity, examples associated steps ofthe method described with respect to FIGS. 9-11 will not be describedagain here. At step 1202, image data can be received (e.g., via a sensorof a MR system). The image data can comprise a picture and/or visualfeatures (e.g., edges).

At step 1204, first inertial data can be received via a first inertialmeasurement unit (e.g., IMU 902 a, IMU 1002), and second inertial datacan be received via a second inertial measurement unit (e.g., IMU 902 b,IMU 1004). In some embodiments, the first inertial measuring unit andthe second inertial measuring unit can be coupled together via a rigidbody. The rigid body can be a body configured to not deform under normaluse (e.g., composed of stiff plastic, metal, etc.). The first inertialdata and/or the second inertial data can include one or more linearacceleration measurements (e.g., three measurements along each of threemeasurement axes) and/or one or more angular velocity measurements(e.g., three measurements along each of three measurement axes). In someembodiments, the first inertial data and/or the second inertial data caninclude linear velocity measurements and/or angular accelerationmeasurements.

At step 1206, a first preintegration term and a second preintegrationterm can be calculated based on the image data, the first inertial data,and the second inertial data. In some embodiments, the firstpreintegration term and the second preintegration term can be calculatedusing a graphical optimization of non-linearly related variables andfunctions. For example, a factor graph depicted in FIG. 11 can be usedto calculate the first preintegration term (e.g., preintegration term1118) and the second preintegration term (e.g., preintegration term1120). In some embodiments, optimizing a factor graph and/or calculatingfunctions in a factor graph can involve fixing some variables whileoptimizing for others.

At step 1208, a position of the wearable head device can be estimatedbased on the first preintegration term and the second preintegrationterm. In some embodiments, the position can be estimated using agraphical optimization of non-linearly related variables and functions.For example, a factor graph depicted in FIG. 11 can be used to estimatethe position (e.g., pose term 1110). In some embodiments, optimizing afactor graph and/or calculating functions in a factor graph can involvefixing some variables while optimizing for others.

At step 1210, virtual content can be presented based on the position. Insome embodiments, virtual content can be presented via one or moretransmissive displays of a wearable head device, as described herein. Insome embodiments, a MR system may estimate a user's field of view basedon the position. If it is determined that virtual content is in thefield of view of the user, virtual content can be presented to the user.

In some embodiments, keyrigs are separated by a time interval. Forexample, as described with respect to FIGS. 6A, 6B, 8, and 11, adjacentkeyrigs (e.g., t=0 and t=1, t=1 and t=2, etc.; i=0 and i=1, i=1 and i=2,etc.; functions of variables 1102 and 1104, functions of variables 1104and 1106, etc.) are separated by respective time intervals. Therespective time intervals may be different (e.g., the time when a keyrigis generated may be determined by the system). In some examples, when atime interval between keyrigs is greater than a maximum time interval(e.g., 5 seconds), benefits of using pre-integration (e.g., node 606,node 804, pre-integration terms 1118, 1120) for visual-inertial bundleadjustment may be reduced (e.g., reduced accuracy compared to usingpre-integration when adjacent keyrigs are less than the maximum timeinterval, reduced accuracy compared to not using pre-integration whenadjacent keyrigs are greater than the maximum time interval). Therefore,it may be desirable to not use pre-integration for bundle adjustmentwhen benefits of pre-integration are reduced.

In some embodiments, the system (e.g., mixed reality system 112, mixedreality system 200, mixed reality system in FIG. 4, mixed reality system900) determines whether a time interval between keyrigs is greater thana maximum time interval (e.g., 5 seconds). Based on this determination,the system determines whether to use pre-integration for bundleadjustment corresponding to the adjacent keyrigs. As an exemplaryadvantage, bundle adjustment accuracy is optimized (e.g., improvedaccuracy compared to using pre-integration when adjacent keyrigs aregreater than the maximum time interval, improved accuracy compared tousing pre-integration when adjacent keyrigs are greater than the maximumtime interval and no weight is adjusted) by forgoing usingpre-integration when pre-integration is less accurate (e.g., when a timeinterval between adjacent keyrigs is greater than a maximum timeinterval). In some embodiments, as another exemplary advantage, byforgoing pre-integration when pre-integration is less accurate, bundleadjustment accuracy may be optimized without any weight adjustment andreducing computing time and resource needs.

In some embodiments, in accordance with a determination that the timeinterval is not greater than the maximum time interval, the system usespre-integration for bundle adjustment. For example, when the timeinterval is not greater than the maximum time interval, visual-inertialbundle adjustment, as described herein, is performed.

In some embodiments, in accordance with a determination that the timeinterval is greater than the maximum time interval, the system forgoesusing pre-integration for bundle adjustment. For example, when the timeinterval is greater than the maximum time interval, spatial bundleadjustment, as described herein, is performed (e.g., instead ofvisual-inertial bundle adjustment); methods including this step may beknown as hybrid visual-inertial bundle adjustment. As another example,when the time interval is greater than the maximum time interval,visual-inertial bundle adjustment is performed, but the correspondingpre-integration term (e.g., node 606, node 804, pre-integration terms1118, 1120) is not added to a graph, as described with respect to FIGS.6A, 6B, 8, and 11; methods including this step may be known as partialvisual-inertial bundle adjustment.

Techniques and methods described herein with respect to FIG. 11 and dualIMUs can also be applied in other respects. For example, dual IMU datacan be used in VIO methods described with respect to FIGS. 6A-6B. DualIMU data can also be used for gravity estimation methods described withrespect to FIG. 8. For example, a second preintegration term can beadded to the graphical optimizations in FIGS. 6A-6B and/or FIG. 8, aswell as variables for the biases of each IMU.

Although graphical optimizations (for example, optimizations depicted inFIGS. 6A-6B, 8, and/or 11) may depict variable nodes including one ormore variable values, it is contemplated that variable values withinvariable nodes can be represented as one or more individual nodes.Although techniques and methods described herein disclose a dual IMUgraphical optimization structure, it is contemplated that similartechniques and methods can be used for other IMU configurations (such asthree IMUs, four IMUs, ten IMUs, etc.). For example, a graphicaloptimization model may include a preintegration term for each IMU, whichmay be a function of a pose estimate, one or more bias terms(corresponding to each IMU), velocity, gravity direction, and one ormore IMU extrinsic values corresponding to each IMU.

Although the disclosed examples have been fully described with referenceto the accompanying drawings, it is to be noted that various changes andmodifications will become apparent to those skilled in the art. Forexample, elements of one or more implementations may be combined,deleted, modified, or supplemented to form further implementations. Suchchanges and modifications are to be understood as being included withinthe scope of the disclosed examples as defined by the appended claims.

What is claimed is:
 1. A method comprising: receiving, via a sensor of awearable head device, image data; receiving, via a first inertialmeasurement unit (IMU) of the wearable head device, first inertial data;receiving, via a second IMU of the wearable head device, second inertialdata; calculating a first preintegration term based on the image dataand based further on one or more of the first inertial data and thesecond inertial data; estimating a position of the wearable head devicebased on the first preintegration term; and presenting virtual content,via a display of the wearable head device, based on the estimatedposition of the wearable head device.
 2. The method of claim 1, wherein:the first preintegration term is calculated based on the image data andthe first inertial data, the method further comprises calculating asecond preintegration term based on the image data and the secondinertial data, and the position is estimated based further on the secondpreintegration term.
 3. The method of claim 1, wherein the firstpreintegration term is calculated based further on a bias of the firstIMU.
 4. The method of claim 1, wherein: the first preintegration term iscalculated based further on a positional relationship between the firstIMU and the second IMU.
 5. The method of claim 4, wherein the positionalrelationship is determined based on an average linear velocity of thefirst IMU and based further on an average linear velocity of the secondIMU.
 6. The method of claim 1, wherein the first preintegration term iscalculated based on one or more of a linear velocity of the first IMUand a linear velocity of the second IMU.
 7. The method of claim 1,wherein: the first inertial data comprises angular velocity dataassociated with the first IMU and linear acceleration data associatedwith the first IMU, and the second inertial data comprises angularvelocity data associated with the second IMU and linear accelerationdata associated with the second IMU.
 8. The method of claim 1, whereinthe first preintegration term relates a first state of the wearable headdevice to a second state of the wearable head device, and wherein eachof the first state and the second state comprises one or more ofrespective position data, respective velocity data, respectiveaccelerometer bias data, and respective gyroscope bias data.
 9. Themethod of claim 1, wherein calculating the first preintegration termcomprises generating a factorized graphical model.
 10. The method ofclaim 1, wherein the first preintegration term is associated with thefirst IMU.
 11. The method of claim 1, further comprising determining anoffset associated with one or more of the first inertial data and thesecond inertial data, wherein calculating the first preintegration termis based further on the offset.
 12. The method of claim 1, wherein thefirst IMU and the second IMU are rigidly coupled to the wearable headdevice.
 13. The method of claim 1, further comprising determining, via asecond sensor of the wearable head device, one or more of a light leveland a texture level associated with a mixed reality environment,wherein: the position of the wearable head device comprises a positionof the wearable head device with respect to the mixed realityenvironment, and one or more of said receiving the second inertial data,said calculating the first preintegration term, said estimating theposition of the wearable head device based on the first preintegrationterm, and said presenting virtual content based on the position of thewearable head device are performed in accordance with a determinationthat the one or more of the light level and the texture level are belowa threshold level.
 14. A system comprising: a sensor of a wearable headdevice; a first inertial measurement unit (IMU) of the wearable headdevice; a second IMU of wearable head device; a display of the wearablehead device; and one or more processors configured to execute a methodcomprising: receiving, via the sensor, image data; receiving, via thefirst IMU, first inertial data; receiving, via the second IMU, secondinertial data; calculating a first preintegration term based on theimage data and based further on one or more of the first inertial dataand the second inertial data; estimating a position of the wearable headdevice based on the first preintegration term; and presenting, on thedisplay, virtual content based on the estimated position of the wearablehead device.
 15. The system of claim 14, wherein: the firstpreintegration term is calculated based on the image data and the firstinertial data, the method further comprises calculating a secondpreintegration term based on the image data and the second inertialdata, and the position is estimated based further on the secondpreintegration term.
 16. The system of claim 14, wherein the firstpreintegration term is calculated based further on a bias of the firstIMU.
 17. The system of claim 14, wherein the first preintegration termis calculated based further on one or more of a linear velocity of thefirst IMU and a linear velocity of the second IMU.
 18. The system ofclaim 14, wherein the first IMU and the second IMU are rigidly coupledto the wearable head device.
 19. A non-transitory computer-readablemedium storing instructions that, when executed by one or moreprocessors, cause the one or more processors to execute a methodcomprising: receiving, via a sensor of a wearable head device, imagedata; receiving, via a first inertial measurement unit (IMU) of thewearable head device, first inertial data; receiving, via a second IMUof the wearable head device, second inertial data; calculating a firstpreintegration term based on the image data and based further on one ormore of the first inertial data and the second inertial data; estimatinga position of the wearable head device based on the first preintegrationterm; and presenting virtual content based on the estimated position ofthe wearable head device.
 20. The non-transitory computer-readablemedium of claim 19, wherein: the first preintegration term is calculatedbased on the image data and the first inertial data, the method furthercomprises calculating a second preintegration term based on the imagedata and the second inertial data, and the position is estimated basedfurther on the second preintegration term.